<?php
/**
 * smarty plugin
 * @package smarty
 * @subpackage plugins
 */


/**
 * smarty {static} function plugin
 *
 * type:     function<br>
 * name:     static<br>
 * purpose:  create a static url
 * @link http://
 * @param array
 * @param smarty
 * @return string
 */
function smarty_function_static($params,&$smarty)
{
	$file = $params['file'] or array();
	$app  = $params['app'];
    if (is_null($app)) $app = THISAPP;

    $text  = BASEURI."apps/$app/public/$file";
    return $text;
}
?>
